#include <stdio.h>
#define NUMELS 5
int main()
{
    int nums[NUMELS] = {16, 54, 7, 43, -5};
    int total = 0, *nPtr;

    nPtr = nums; /*store address of nums[0] in nPtr */
    while (nPtr < nums + NUMELS)
        total += *nPtr++;
    printf("The total of array elements is %d\n", total);

    return 0;
}